﻿<?	
include "conexao.php";
@session_start(); // Inicializa a sessão
connect();
$date = date("d/m/y");
$hora = date("H:i");
?>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
<link href="bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
<link href="bootstrap/css/docs.css" rel="stylesheet">
<link href="bootstrap/js/google-code-prettify/prettify.css" rel="stylesheet">
<link href="css/index.css" rel="stylesheet">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="assets/js/html5shiv.js"></script>
<![endif]-->
<!-- jQUERY PARA VALIDAÇÃO-->
<link rel="stylesheet" href="css/validationEngine.jquery.css" type="text/css" />
<link rel="stylesheet" href="css/template.css" type="text/css" />
<script src="js/jquery-1.8.2.min.js" type="text/javascript"></script>
<script src="js/languages/jquery.validationEngine-pt_BR.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery.validationEngine.js" type="text/javascript" charset="utf-8"></script>
<!-- Fav and touch icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="assets/ico/favicon.png">
</head>
<script>
	    jQuery(document).ready(function () {  // binds form submission and fields to the validation engine
	    jQuery("#form1").validationEngine();
		});
</script>
<body>
<form name="form1" id="form1" method="post" action="listagempedidosporsetor.php">
<!--=============================================================
	ADICIONADO PRODUTOS
	=============================================================-->
	<div class="form-actions" id="formalarioadicionaproduto" name="formalarioadicionaproduto">
		<fieldset>
			<div class="span4">
			<H5>PESQUISAR POR SETOR</H5> 
		<label>SETOR</label>
			<div class="input-append">
<!--=============================================================
	COMBO BOX DINAMICO
	=============================================================-->
			<select class="span6 validate[required]" name="cmbsetorpesquisa" id="idcmbsetorpesquisa">
               <option value="<?  ?>" /><? //echo $nomecategoria; ?></option>
				<?
	    		$sql = "SELECT str.*,COUNT(str.codsetor) AS total FROM setor AS str
						group by nomesetor";
					mysql_query("SET NAMES 'utf8'");
					mysql_query('SET character_set_connection=utf8');
					mysql_query('SET character_set_client=utf8');
					mysql_query('SET character_set_results=utf8');
					$Resultado = mysql_query($sql) or die("Erro: " . mysql_error());
				   while ($array_exibir = mysql_fetch_array($Resultado)) 
				   {
					?>
				    <option value="<? echo $array_exibir['codsetor']?>">
					<? echo ($array_exibir['setor'])?> -
				    <? echo ($array_exibir['nomesetor'])?>
					 </option>
                    <?
					$i++;
			        }
					
				?>
			</select>

			</div>
			
			<label>ANO</label>
			<div class="input-append">
<!--=============================================================
	COMBO BOX DINAMICO
	=============================================================-->
				<select class="span6 validate[required]" name="cmbanopesquisa"
					id="idcmbanopesquisa">
					<option value=""> </option>
						<option value="2013">2013</option>
						<option value="2014">2014</option>
						<option value="2015">2015</option>
						<option value="2016">2016</option>
						<option value="2017">2017</option>
						<option value="2018">2018</option>
						<option value="2019">2019</option>
						<option value="2020">2020</option>
						<option value="2021">2021</option>
						<option value="2022">2022</option>
						<option value="2023">2023</option>
			
				</select>
				</div>
				<label>MÊS</label>
			<div class="input-append">
				<select class="span6 validate[required]" name="cmbdata" id="idcmbdata">
								<option value=""> </option>
								<option value="01">Janeiro</option>
								<option value="02">Fevereiro</option>
								<option value="03">Março</option>
								<option value="04">Abril</option>
								<option value="05">Maio</option>
								<option value="06">Junho</option>
								<option value="07">Julho</option>
								<option value="08">Agosto</option>
								<option value="09">Setembro</option>
								<option value="10">Outubro</option>
								<option value="11">Novembro</option>
								<option value="12">Dezembro</option>                
						</select>
			</div>
			<div class="form-actions">
			
			<button type="submit" id="idinserir" name="inserir" value="inserir" class="btn btn-success">
				<i class="icon-plus icon-white"></i> Buscar
			</button>
			
		   </div>  
		</div>
			<div class="alert-error" id="resposta"></div>
		</fieldset>
		<div id="mensagens"></div>
	</div>
</form>
   <script src="bootstrap/js/bootstrap-dropdown.js"></script>
</body>

</html>

